{% extends "sentry/layout_bis.html" %}

{% load i18n %}
{% load sentry_helpers %}

{% block title %}BIS &gt; Sentry &gt; Search{% endblock %}

{% block breadcrumbs %}
    <div id="breadcrumbs"><a href="/admin">Home</a> &gt; <a href="/sentry">sentry</a> &gt; search-results</div>
{% endblock %}

{% block extrastyle %}
<style type="text/css" media="screen">
#content-main {
    min-width: 780px;
}
#content.content-bis {
    width: 100%;
}
#details {
    padding-top: 1em;
}
</style>
{% endblock %}

{% block content %}
{{ block.super }}
<div id="gavin-others">&nbsp;</div>
<div id="content-main">
    <!-- CONTENT -->
    {% paginate message_list from request as message_list per_page 15 %}

    <div class="paging-wrap">
        <div class="clearfix">
            <form method="GET" action="">
                <input type="hidden" name="q" value="{% if query %}{{ query }}{% endif %}"/>
                <div class="sort-by">Sort by <select name="sort" onchange="this.form.submit()">
                    <option value=""{% ifequal sort 'relevance' %} selected="selected"{% endifequal %}>Relevance</option>
                    <option value="date"{% ifequal sort 'date' %} selected="selected"{% endifequal %}>Last Seen</option>
                    <option value="new"{% ifequal sort 'new' %} selected="selected"{% endifequal %}>First Seen</option>
                </select>
                </div>
            </form>
            {{ message_list.paging }}
        </div>
    </div>

    {% if message_list.objects %}
        <ul class="messages" id="message_list">
            {% for group, priority in message_list.objects|with_priority %}
                {% include "sentry/partial/_group.html" %}
            {% endfor %}
        </ul>
    {% else %}
        <ul class="messages" id="message_list">
            <li class="no-messages" id="no_messages">{% trans "No messages match your query." %}</li>
        </ul>
    {% endif %}

    <div class="clearfix">
        {{ message_list.paging }}
    </div>
</div>
{% endblock %}
